import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import City from '@/components/City'
import Chur from '@/components/Chur'
import Over from '@/components/Over'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'HelloWorld',
      component: HelloWorld
    },
    {
      path: '/details',
      name: 'details',
      component: ()=>import("../components/Details.vue")
    },
    {
      path: '/city',
      name: 'city',
      component: City,
      children:[
        {
          path: '/chur',
          name: 'chur',
          component: Chur,
        },
        {
          path: '/over',
          name: 'over',
          component:Over,
        }
      ]
    }
  ],
  scrollBehavior (to, from, savedPosition) {
    return { x: 0, y: 0 }
  }
})
